Page({
    data: {
        keyword: ''
    },
    onBack() { wx.navigateBack(); },
    onInput(e) { this.setData({ keyword: e.detail.value }); },
    onSearch() {
        const kw = (this.data.keyword || '').trim();
        if (!kw) { wx.showToast({ title: '请输入关键词', icon: 'none' }); return; }
        wx.showToast({ title: `搜索：${kw}`, icon: 'none' });
    },
    onCreate() { wx.navigateTo({ url: '/pages/keys/create/index' }); }
})